package com.ihg.hiex.admin.service.session;

import java.util.Date;
import java.util.List;
import java.util.Map;
import org.springframework.web.multipart.MultipartFile;
import com.ihg.hiex.admin.service.DataService;
import com.ihg.hiex.entity.data.conference.ConferenceRoom;
import com.ihg.hiex.entity.session.Session;
import com.ihg.hiex.entity.session.before.test.PreWorkAssignment;
import com.ihg.hiex.entity.session.meeting.SessionMeeting;
import com.ihg.hiex.entity.session.participator.Type;
import com.ihg.hiex.entity.session.task.SessionTask;
import com.ihg.hiex.entity.session.task.Status;
import com.ihg.hiex.entity.user.Assessor;
import com.ihg.hiex.entity.user.Delegate;

/**
 *
 * @author Ark
 *
 */
public interface SessionTaskService extends DataService<SessionTask> {
    
    /**
     * 
     * @param session
     * @param name
     * @return
     */
    public List<SessionTask> listByName(Session session, String name);
    
    /**
     * 
     * @param session
     * @param parent
     * @return
     */
    public List<SessionTask> list(Session session, String parent);
    
    /**
     * @param session
     * @param assessor
     * @param parent
     * @return
     */
    public List<SessionTask> list(Session session, String parent, Assessor assessor);
    
    /**
     * @param session
     * @param delegate
     * @param parent
     * @return
     */
    public List<SessionTask> list(Session session, String parent, Delegate delegate);
    
    /**
     * 
     * @param session
     * @param assessorIds
     * @param names
     * @return
     */
    public Map<String, Map<String, SessionTask>> list(Session session, Long[] assessorIds, String[] names);
    
    /**
     * 
     * @param session
     * @param parents
     * @param target
     * @return
     */
    public Map<String, Map<String, Map<String, SessionTask>>> list(Session session, String[] parents, Type target);
    
    /**
     * 
     * @param session
     * @param parents
     * @return
     */
    public Map<String, Map<String, Map<String, Map<String, SessionTask>>>> listAssessorTask(Session session, String[] parents);
    
    /**
     * 
     * @param session
     * @param names
     * @param target
     * @return
     */
    public Map<String, Map<String, SessionTask>> listByName(Session session, String[] names, Type target);
    
    /**
     * 
     * @param session
     * @param delegate
     * @param date
     * @return
     */
    public Map<String, SessionTask> list(Session session, Delegate delegate, Date date);
    
    /**
     * @param session
     * @param names
     * @param target
     * @return
     */
    public Map<String, Integer> listFinishTask(Session session, List<String> names, Type target);
    
    /**
     * 
     * @param session
     * @param assessor
     * @param date
     * @return
     */
    public Map<String, SessionTask> list(Session session, Assessor assessor, Date date);
    
    /**
     * 
     * @param session
     * @param assessor
     * @param delegate
     * @param parent
     * @param target
     * @return
     */
    public Map<String, SessionTask> list(Session session, Assessor assessor, Delegate delegate, String parent, Type target);
    
    /**
     * 
     * @param delegates
     * @param session
     * @param type
     * @param names
     * @param parent
     * @return
     */
    public Map<Long, Status> listCalibrationReportStatus(List<Delegate> delegates, Session session, Type type, String[] names, String parent);
    
    
    /**
     * 
     * @param session
     * @param assessors
     * @param date
     * @return
     */
    public List<SessionTask> listMainTaskByAssessor(Session session, List<Assessor> assessors, Date date);
    
    /**
     * 
     * @param session
     * @param assessor
     * @param delegate
     * @param parent
     * @return
     */
    public List<SessionTask> listItemTaskByAssessor(Session session, Assessor assessor, Delegate delegate, String parent);
    
    /**
     * 
     * @param session
     * @param delegates
     * @param date
     * @return
     */
    public List<SessionTask> listMainTaskByDelegate(Session session, List<Delegate> delegates, Date date);
    
    /**
     * 
     * @param session
     * @param delegate
     * @param parent
     * @return
     */
    public List<SessionTask> listItemTaskByDelegate(Session session, Delegate delegate, String parent);
    
    /**
     * @param session
     * @param name
     * @return
     */
    public SessionTask load(Session session, String name);
    
    /**
     * 
     * @param session
     * @param type
     * @param name
     * @return
     */
    public SessionTask load(Session session, Type type, String name);
    
    /**
     * @param session
     * @param name
     * @param assessor
     * @return
     */
    public SessionTask load(Session session, String name, Assessor assessor);
    
    /**
     * @param session
     * @param name
     * @param delegate
     * @return
     */
    public SessionTask load(Session session, String name, Delegate delegate);
    
    /**
     * 
     * @param session
     * @param assessor
     * @param delegate
     * @param target
     * @param name
     * @return
     */
    public SessionTask load(Session session, Assessor assessor, Delegate delegate, Type target, String name);
    
    /**
     * 
     * @param session
     * @param sessionTask
     */
    public void finish(Session session, SessionTask sessionTask);
    
    /**
     * 
     * @param sessionTask
     */
    public void finishEvaluation(SessionTask sessionTask);
    
    /**
     * @param session
     * @param sessionTask
     */
    public void finishSpecial(Session session, SessionTask sessionTask);
    
    /**
     * @param session
     * @param sessionTask
     * @param workbook
     */
    public void uploadCareerWorkbook(Session session, SessionTask sessionTask, MultipartFile workbook);
    
    /**
     * 
     * @param session
     * @param delegate
     * @return
     */
    public PreWorkAssignment loadPreWorkAssignment(Session session, Delegate delegate);
    
    /**
     * 
     * @param session
     * @param delegate
     * @param sessionTask
     * @param preWorkAssignment
     */
    public void createPreWorkAssignment(Session session, Delegate delegate, SessionTask sessionTask, PreWorkAssignment preWorkAssignment);
    
    /**
     * 
     * @param preWorkAssignment
     */
    public void editPreWorkAssignment(PreWorkAssignment preWorkAssignment);
    
    /**
     * 
     * @param sessionMeeting
     */
    public void editOrientationTask(SessionMeeting sessionMeeting, Long hostId, ConferenceRoom room, String startTime, String endTime);
    
    /**
     * 
     */
    public void editQAndACallTask(SessionMeeting sessionMeeting, Long hostId, ConferenceRoom room, String startTime, String endTime);
    
    /**
     * 
     * @param sessionTasks
     * @param session
     * @param assessor
     * @param delegate
     * @param target
     * @param parent
     */
    public void finish(SessionTask[] sessionTasks, Session session, Assessor assessor, Delegate delegate, Type target, String parent);
    
    /**
     * 
     * @param sessionTask
     */
    public void finish(SessionTask sessionTask);
    
    /**
     * @param session
     * @param names
     * @return
     */
    public Map<String, SessionTask> construct(Session session, List<String> names);
    
}
